package com.ayoka.parenting.ui.payment.openmember;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;

import com.ayoka.parenting.R;
import com.ayoka.parenting.databinding.ActivityOpenMemberBinding;
import com.ayoka.parenting.mvp.MVPBaseActivity;
import com.jincp.common.model.ToolBarOptions;
import com.jincp.common.utils.StatusBarUtils;

import android.databinding.ViewDataBinding;
import android.view.View;

/**
 * @ProjectName: MVPPlugin.
 * @ClassName: OpenMemberActivity.
 * @Description: .
 * @Author: jincp.
 * @CreateDate: 2019/10/10 18:17.
 */
public class OpenMemberActivity extends MVPBaseActivity<ActivityOpenMemberBinding, OpenMemberContract.View, OpenMemberPresenter> implements OpenMemberContract.View {

    public static void start(Activity activity) {
        Intent intent = new Intent(activity, OpenMemberActivity.class);
        activity.startActivity(intent);
    }

    @Override
    protected void onBeforeSetContentLayout() {
        StatusBarUtils.setStatusBar(this, false, false);
        StatusBarUtils.setStatusTextColor(this, false);
    }

    @Override
    protected int getContentLayout() {
        return R.layout.activity_open_member;
    }

    @Override
    protected void initViews() {
        mDataBinding.btnOpenMember.setOnClickListener(this);

        mDataBinding.tvOriginalPrice.setText("3999元/年");
        mDataBinding.tvOriginalPrice.getPaint().setFlags(Paint.ANTI_ALIAS_FLAG | Paint.STRIKE_THRU_TEXT_FLAG);
        mDataBinding.tvSpecialPrice.setText("999元/年");
    }

    @Override
    protected void initData(Bundle savedInstanceState) {
        ToolBarOptions options = new ToolBarOptions();
        options.backgroundResource = 0;
        options.navigateId = R.mipmap.icon_back_golden;
        setCustomToolBar(mDataBinding.customToolbar.toolbar, options);
    }

    @Override
    protected OpenMemberPresenter getPresenter() {
        return new OpenMemberPresenter();
    }

    @Override
    public void onClick(View view) {
        if (view == mDataBinding.btnOpenMember){

        }
    }
}
